package com.liang.mybatis01;

import com.liang.mybatis01.mapper.UserMapper;
import com.liang.mybatis01.utils.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.HashMap;

//万能map查询
public class MybatisTest1 {
    public static void main(String[] args) {
        SqlSession sqlSession = MybatisUtil.getSqlSession();
        UserMapper mapper = sqlSession.getMapper(UserMapper.class);
        HashMap<String, Object> map = new HashMap<>();
        map.put("id",20);
        map.put("userCode","zhangsan");
        map.put("userName","张三");
        map.put("pwd","123");
        mapper.updateUser1(map);

        sqlSession.commit();
        sqlSession.close();
    }
}
